[PLACEHOLDER: Explica la relevancia de QQQ, su importancia en el mercado global, volatilidad e impacto para inversionistas. Incluir contexto del Nasdaq-100 ETF.]
[PLACEHOLDER: Introducción a los conceptos fundamentales de ARIMA (Autorregresivos, Integrados, Media Móvil), su importancia teórica y utilidad práctica en pronósticos de series temporales financieras.]
[PLACEHOLDER: Contexto completo del QQQ (Nasdaq-100 ETF), período de análisis seleccionado (octubre 2022 - presente), eventos significativos que han afectado el precio (crisis de volatilidad, cambios de política monetaria, rally de IA, etc.)]
serie_QQQ <- getSymbols("QQQ", src="yahoo", auto.assign=FALSE, from="2015-01-01")
Precio <- serie_QQQ$`QQQ.Close`
datos_qqq <- data.frame(
Fecha = index(Precio),
Precio = as.numeric(Precio)
)
datos_qqq <- datos_qqq %>%
mutate(Corte = as.yearqtr(Fecha))
lista_frames <- lapply(unique(datos_qqq$Corte), function(c) {
dt <- datos_qqq[datos_qqq$Corte <= c, ]
dt$Frame <- as.character(c)
return(dt)
})
datos_animados <- dplyr::bind_rows(lista_frames)
p <- ggplot(datos_animados, aes(x = Fecha, y = Precio)) +
geom_area(aes(frame = Frame), fill = qqq_pal$primary, alpha = 0.1, position = "identity") +
geom_line(aes(frame = Frame), color = qqq_pal$primary, size = 0.8) +
labs(
title = "Evolución Dinámica del QQQ",
subtitle = "Crecimiento histórico acumulado desde octubre 2022",
x = "",
y = "Precio (USD)"
) +
scale_y_continuous(labels = scales::dollar_format()) +
theme_QQQ() +
theme(plot.title = element_text(size = 14))
plotly::ggplotly(p, tooltip = c("x", "y")) %>%
plotly::layout(
paper_bgcolor = 'rgba(0,0,0,0)',
plot_bgcolor = 'rgba(0,0,0,0)',
font = list(family = "Inter, sans-serif", color = qqq_pal$text_gray),
hovermode = "x unified"
) %>%
plotly::animation_opts(frame = 100, transition = 0, redraw = FALSE) %>%
plotly::animation_slider(currentvalue = list(prefix = "Período: ")) %>%
plotly::config(displayModeBar = FALSE)